﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;

namespace WebApplication1
{
    public partial class frmViewDisbursementList : System.Web.UI.Page
    {
        string user = "E0001";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {    user = "E0001"; //Session["username"];
                BusinessController.OutstandingRequisitionManager manager = new BusinessController.OutstandingRequisitionManager(user);
                dgEmpDistributionList.DataSource = BusinessController.OutstandingRequisitionManager.getDistributionList();
                DataBind();
            }
        }
        protected void Search_Click(object sender, EventArgs e)
        {
            DateTime date_from = Convert.ToDateTime(Request.Form["txtFrom"]);
            DateTime date_to = Convert.ToDateTime(Request.Form["txtTo"]);

            BusinessController.OutstandingRequisitionManager manager = new BusinessController.OutstandingRequisitionManager(user, date_from, date_to);
            dgEmpDistributionList.DataSource = BusinessController.OutstandingRequisitionManager.getDistributionByPeriodList();
            dgEmpDistributionList.DataBind();
        }
    }
}